<?php
/**
* @version		$Id:userinfos.php  1 2013-11-05 20:17:56Z  $
* @package		Cash_user
* @subpackage 	Tables
* @copyright	Copyright (C) 2013, . All rights reserved.
* @license #
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
* Jimtawl TableUserinfos class
*
* @package		Cash_user
* @subpackage	Tables
*/
class TableUserinfos extends JTable
{
	
   /** @var int virtuemart_userinfo_id- Primary Key  **/
   public $virtuemart_userinfo_id = null;

   /** @var varchar title  **/
   public $title = null;

   /** @var int created_by  **/
   public $created_by = null;

   /** @var int modified_by  **/
   public $modified_by = null;

   /** @var int unsigned virtuemart_user_id  **/
   public $virtuemart_user_id = null;

   /** @var char address_type  **/
   public $address_type = null;

   /** @var char address_type_name  **/
   public $address_type_name = null;

   /** @var char name  **/
   public $name = null;

   /** @var char company  **/
   public $company = null;

   /** @var char last_name  **/
   public $last_name = null;

   /** @var char first_name  **/
   public $first_name = null;

   /** @var char middle_name  **/
   public $middle_name = null;

   /** @var char phone_1  **/
   public $phone_1 = null;

   /** @var char phone_2  **/
   public $phone_2 = null;

   /** @var char fax  **/
   public $fax = null;

   /** @var char address_1  **/
   public $address_1 = null;

   /** @var char address_2  **/
   public $address_2 = null;

   /** @var char city  **/
   public $city = null;

   /** @var smallint unsigned virtuemart_state_id  **/
   public $virtuemart_state_id = null;

   /** @var smallint unsigned virtuemart_country_id  **/
   public $virtuemart_country_id = null;

   /** @var char zip  **/
   public $zip = null;

   /** @var tinyint agreed  **/
   public $agreed = null;

   /** @var datetime created_on  **/
   public $created_on = "0000-00-00 00:00:00";

   /** @var datetime modified_on  **/
   public $modified_on = "0000-00-00 00:00:00";

   /** @var datetime locked_on  **/
   public $locked_on = "0000-00-00 00:00:00";

   /** @var int locked_by  **/
   public $locked_by = null;




	/**
	 * Constructor
	 *
	 * @param object Database connector object
	 * @since 1.0
	 */
	public function __construct(& $db) 
	{
		parent::__construct('#__virtuemart_userinfos', 'virtuemart_userinfo_id', $db);
	}

	/**
	* Overloaded bind function
	*
	* @acces public
	* @param array $hash named array
	* @return null|string	null is operation was satisfactory, otherwise returns an error
	* @see JTable:bind
	* @since 1.5
	*/
	public function bind($array, $ignore = '')
	{ 
		
		return parent::bind($array, $ignore);		
	}

	/**
	 * Overloaded check method to ensure data integrity
	 *
	 * @access public
	 * @return boolean True on success
	 * @since 1.0
	 */
	public function check()
	{



		/** check for valid name */
		/**
		if (trim($this->title) == '') {
			$this->setError(JText::_('Your Userinfos must contain a title.')); 
			return false;
		}
		**/		

		return true;
	}
}
